﻿using DevExpress.XtraGrid.Demos.util;
using DiaoPaiDaYin;
using DXApplicationTangche.DTO;
using DXApplicationTangche.model;
using DXApplicationTangche.service.WinForm_Service;
using DXApplicationTangche.UC.款式异常;
using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using DXApplicationTangche.UC.门店下单.DTO;
using DXApplicationTangche.UC.门店下单.form;
using DXApplicationTangche.Utils;
using DXApplicationTangche.原型;
using mendian;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DXApplicationTangche.service
{
    /// <summary>
    /// 订单服务
    /// </summary>
    public class OrderService
    {
        
        /// <summary>
        /// 动态保存订单
        /// </summary>
        /// <param name="orderDto"></param>
        public static void DynamicSaveOrder(OrderDto orderDto)
        {
        }

        /// <summary>
        /// 更改订单备注
        /// </summary>
        /// <param name="orderid"></param>
        /// <param name="remark"></param>
        /// <returns></returns>
        public static Boolean ChangeOrderRemark(String orderid,String remark)
        {
            try
            {
                if ("true".Equals(RestCall.httpGetMethod(URL.接口url + "/barcode/updateOrderCommitRemark?orderId=" + orderid + "&remarks=" + remark)))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch
            {
                return false;
            }
        }

        public static Boolean ChangeOrder设计点(String orderId, DTODesignPoints设计点 dTODesignPoints)
        {
            try
            {
                RestCall.PostHttp(URL.接口url + "/barcode/updateOrderCommitDesignPoint?orderId=" + orderId,
                    FunctionHelper.JsonSerialization(dTODesignPoints));
                return true;
            }
            catch
            {
                return false;
            }
        }
        
    }
}
